<!--  -->
<template>
  <div>
    <v-container  fluid class="pa-0">
      <v-layout>
        <v-flex>
          <img v-if="cid === '1003'" src="@/assets/images/more/t-notice.jpg" width="100%" >
          <img v-if="cid === '2000'" src="@/assets/images/more/t-changcheng.jpg" width="100%" >
          <img v-if="cid === '3000'" src="@/assets/images/more/t-sanjin.jpg" width="100%" >
          <img v-if="cid === '4000'" src="@/assets/images/more/t-taihang.jpg" width="100%" >
          <img v-if="cid === '5000'" src="@/assets/images/more/t-huanghe.jpg" width="100%" >
          <img v-if="cid === '1002'" src="@/assets/images/more/t-forum.jpg" width="100%" >
        </v-flex>
      </v-layout>
    </v-container>
    <v-container class="pt-0">
      <v-layout wrap>
        <template v-for="(item,index) in data">
          <v-flex xs12 sm12 md4 lg3  :key="index">
            <v-card hover :to="'/detail/' + item.id" class="ma-1" height="260px" style="overflow:hidden">
              <v-card-media :src="MImage(item.image)" height="150px"></v-card-media>
              <v-card-title>
                <div>
                  <span class="grey--text">{{item.updatetime ? item.updatetime.slice(0,10) : ''}}</span><br>
                  <span class="subheading font-weight-black"><v-chip v-if="index < 3 " outline color="primary" class="small" text-color="primary">热门</v-chip>{{item.title}}</span><br>
                  <!-- <span class="body-1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{MOverview(item.content, 200)}}</span> -->
                </div>
                </v-card-title>
              <!-- <v-card-text>
                
              </v-card-text> -->
              <v-card-actions></v-card-actions>
            </v-card>
          </v-flex>
        </template>
      </v-layout>
    </v-container>
  </div>
</template>

<script>
import { fetchList } from '@/api/homepage'
export default {
  name: 'MorePage',
  props: {
    cid: {
      type: String,
      required: true
    }
  },
  data () {
    return {
      data: null
    }
  },
  created: function () {
    this.getData()
  },
  watch: {
    cid: function (newVal, OldVal) {
      this.getData()
    }
  },
  components: {},
  methods: {
    getData () {
      fetchList(this.cid).then(res => {
        this.data = []
        this.data = res.data.data
      })
    }
  }
}
</script>
<style scoped>
</style>